1. Field of the invention
The present invention relates to a method and device for generating and decoding an image code, and more particularly, to a method and device for generating an image code, a direction of which is searchable without any overhead such as a direction finder pattern or with a minimal overhead and a method and device for decoding the image code.
2. Description of Related Art
Methods of providing a service corresponding to a code by recognizing a one-dimensional bar code or a two-dimensional image code by means of a camera, a scanner, or the like have been researched. Recently, an image code, a radio frequency identification (RFID) tag, or the like is used as a means for designating an identification number to an object and recognizing the identification number, as ubiquitous computing environments becomes more pervasive. Image codes can be mass-produced, are inexpensive, and can be recognized by a multi-purpose device such as a cellular phone embedding a camera, and accordingly image codes attract much attention.
In order to recognize the image code, generally, decoding including searching for a code image printed on a physical medium, recognizing each cell or pattern in the searched image, and extracting information and error-correction information are performed.
An image code should be searched from an image input through a camera, etc., a specially defined pattern, which can be recognized as an image code, is applied to the image code. For example, for the recognition of a rotation angle and a pattern of an image code, a guard pattern is used in a one-dimensional bar code, and a finder pattern is used in a two-dimensional bar code. The decoding of the image code is performed by extracting the pattern.
In the case where a quick response (QR) code, which is one of the two-dimensional image codes, is applied, large rectangular finder patterns located in three corners are used. In the case where a data matrix code is applied, two neighboring solid bars located in left and lower corners of a rectangular code are used. When a maxicode is applied, a special pattern located on the center called a bullseye is used, and when PDF417 is applied, a pattern similar to a bar code is used.
The patterns used in the codes are different in shape and size and have merits and demerits, however, the patterns have a common disadvantage in that the patterns should be added in a code region as an overhead. In order to decrease the overhead, a method of using a very small pattern such as a dot can be used. However, when the dot is damaged or lost, the direction of the code cannot be detected. On the contrary, when the pattern is enlarged to improve a characteristic of direction detection capability, a code ratio, which is a ratio of the amount of information to an area of the total region, is decreased, thus making the image code inefficient.
Once a region of the image code is extracted and the direction of the image code can be recognized, information is extracted by a decoding process using an error processing method such as a parity method, a checksum, and a cyclic redundancy check (CRC). Generally, in the two-dimensional code, a Reed-Solomon algorithm is used for encoding in order to increase error tolerance. In addition, a Bose-Chaudhuri-Hocquenghem (BCH) algorithm may also be used.